<?php
namespace Home\Controller;
use Think\Controller;
class ShareController extends Controller {
    public function index(){
        $timestamp = time();
        $nonceStr = createNonceStr();
        $jsapi_ticket = getJsApiTicket();
        $url = "http://".$_SERVER['SERVER_NAME'].__SELF__;
        $string1 = "jsapi_ticket=".$jsapi_ticket."&noncestr=".$nonceStr."&timestamp=".$timestamp."&url=".$url;
        var_dump($string1);
        $signature = sha1($string1);
        $data = array(
            'appid'=>APPID,
            'timestamp'=>$timestamp,
            'nonceStr'=>$nonceStr,
            'signature'=>$signature,
            'url'=>$url,
            );
        $this->assign($data);
    	$this->display();
    }
  
}